package com.srit.map.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.srit.core.ibatis.dao.SqlMapDao;
import com.srit.map.business.service.ChartService;
@Service
public class ChartServiceImpl implements ChartService {
	@Autowired(required = true)
	private SqlMapDao sqlMapDao;

	@Override
	public List getTown() {
		List list = sqlMapDao.queryForList("Resource.getTown",null);
		return list;
	}

	@Override
	public int getCompanyCountByArea(String area) {
		int count = (Integer)sqlMapDao.queryForObject("Chart.getTownCount", area);
		return count;
	}
	
}
